package com.econ.powercloud.ems.common.enums;

/**
 * @Author : zjf
 * @Description : 标签枚举
 * @Date : 2021/11/2 15:29
 * @Modified by : zjf
 */
public enum TagType {
    MONOMER("dt", "单体"),
    U("U","电压"),
    T("T","温度"),
    DTU("dtU","单体电压"),
    DTT("dtT","测温点"),
    ;

    private String code;
    private String desc;

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    TagType(String code, String desc){
        this.code=code;
        this.desc=desc;
    }

    public static String getCodeFromCode(String code){
        for(TagType type: TagType.values()){
            if(type.getCode() == code){
                return type.getDesc();
            }
        }
        return null;
    }

}
